#pragma once

#include <QtWidgets/QWidget>
#include "CQBaseWin.hpp"
#include "CQLogin.h"
#include "ui_CQChatBox.h"

class CQChatBox : public QWidget,public CQBaseWin<CQChatBox>
{
	Q_OBJECT

public:
	CQChatBox(UserInfo u,QWidget *parent = Q_NULLPTR);
	~CQChatBox();

	virtual void paintEvent(QPaintEvent* event)override;
private:
	void set_win_btn();
	virtual void mousePressEvent(QMouseEvent*)override;
	virtual void mouseMoveEvent(QMouseEvent*)override;
	virtual void mouseReleaseEvent(QMouseEvent*)override;

private slots:
	void window_closed();
	void window_min();
	void send_msg();

private:
	Ui::CQChatBox ui;
	UserInfo _u;
};
